﻿using System;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;

public interface IRepository<T> : IDisposable where T : class
{
    DbSet<T> Set();

    IQueryable<T> GetAll();

    IQueryable<T> GetIncluding(params Expression<Func<T, object>>[] include);

    T GetById(int id);

    T Add(T entity);

    bool Create(T entity);

    bool Update(T entity);

    bool Delete(T entity);

    void SaveChanges();
}
